<template>
	<view class="page">
		<view class="p20 pt30 c255" style="background: #19291C;text-align:center">
			<!-- <image src="" -->
			<view class="fz14 u-font-bold">兑换成功</view>
		</view>
		<view class="p12">

			<view class="bg-white brs10 mb20 bm pb16">
				<view class="u-flex" style="align-items: stretch;">
					<image mode="aspectFill"
						src="https://diy.cdevelopment.cn/admin-api/infra/file/18/get/ab081824ea7386018f60fae46571ef2336ae54c5f20022c486a9717e1564822b.png"
						style="width:180rpx;height:180rpx;"></image>
					<view class="pl12 u-f1 u-flex u-f-jsb" style="flex-direction: column;">
						<view class="fz14 u-flex u-f-jsb" style="width: 100%;">
							大容量单肩休闲包
						</view>
						<view class="fz14 u-flex u-f-jsb u-font-bold" style="width: 100%;">

							<span>x1</span>
						</view>


					</view>
				</view>




			</view>
			<view class="bm pb16 mb16">
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">抵扣积分</span>
					<span style="color: #70B52C;">1200积分</span>
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">订单编号</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">配送费</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">备注</span>
					888
				</view>
			</view>

			<view>

				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6" style="min-width:100px">收货信息</span>
					<span style="text-align:right">李明明，13412425456，广东省深圳市龙
						岗区坂田街道XXX路XX小区XX栋</span>
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">创建时间</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">付款时间</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">发货时间</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">收货时间</span>
					888
				</view>
				<view class="fz12 mt13 u-f-jsb u-flex">
					<span class="c6">订单奖励</span>
					888
				</view>
			</view>

		</view>




	</view>
</template>

<script>
	import {
		getPlatform
	} from '@/config/util.js'
	export default {
		data() {
			return {
				showResult: false,
				isSuccess: false,
				statusAttr: ['', '待签到', '已签到', '已取消'],
				info: {}
			}
		},
		onLoad(e) {
			this.getInfo(e.id)
		},
		onShow() {},
		methods: {
			toMap() {
				let that = this
				if (that.info.activeLocate) {
					let lng = that.info.activeLocate.split(',')[0]
					let lat = that.info.activeLocate.split(',')[1]
					console.log(lng, lat)
					uni.openLocation({
						latitude: Number(lat),
						longitude: Number(lng),
						name: that.info.title,
						address: that.info.activeAddr,
						success: function() {
							console.log('success');
						},
						error: function(err) {
							console.log(err);
						}
					});
				}
			},
			getInfo(id) {

				this.$api.appoint_detail({
					id: id
				}, res => {
					if (res.code == 200) {
						this.info = res.data
					}
				})
			},
			toSign() {


				this.$api.appointSign({
					id: this.info.id
				}, res => {
					if (res.code == 200) {
						this.getInfo(this.info.id)
						this.showResult = true
						this.isSuccess = true
					} else {
						this.$common.errorToShow(res.msg)

					}
				})

			},
			toClose() {


				this.$api.appointCancel({
					id: this.info.id
				}, res => {
					if (res.code == 200) {
						this.getInfo(this.info.id)
						this.showResult = false
					} else {
						this.$common.errorToShow(res.msg)

					}
				})

			},
		}
	}
</script>

<style lang="scss" scoped>
	.btn-nav {

		width: 120rpx;
		height: 50rpx;
		justify-content: center;
		text-align: center;
		color: #fff;
		background: #ABC7C9;
		border-radius: 40px;
	}

	.btn-sure {

		width: 100%;
		height: 80rpx;
		text-align: center;
		color: #fff;
		margin: 0 auto;
		line-height: 80rpx;
		background: #ABC7C9;
		border-radius: 40px;
	}

	.btn-sure1 {

		border: 1px solid #ABC7C9;
		background: #fff;
		color: #ABC7C9;
	}

	.btn {
		background: #ABC7C9;
		height: 80rpx;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50rpx;
		text-align: center;
	}

	.btn1 {
		border: 1px solid #ABC7C9;
		height: 80rpx;
		color: #ABC7C9;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50rpx;
		text-align: center;
	}

	.line {
		width: 750rpx;
		height: 4rpx;
		position: relative;
		top: -4rpx;
		background: #F6F9F9;
		border-radius: 0px 0px 0px 0px;
	}

	.status1 {
		color: #E54440;
	}

	.status2 {
		color: #39959B;
	}

	.status3 {
		color: #333;
	}
</style>